package com.nl.controller.common.model;

import java.io.Serializable;


import lombok.Data;

/**
 * desc:
 * 
 * @author  sj
 * @version createtime: 2019年3月5日 下午4:55:38
 */

@Data
public class BaseResult<T> implements Serializable{

    private static final long serialVersionUID = 6138451404259248696L;
    private String retCode;
    private String retMsg;
    private T data;
    
    
    public static <T>BaseResult<T> newSuccessInstance(){
        BaseResult<T> result = new BaseResult<T>();
        result.setRetCode("0");
        return result;
    }
    
    public static <T>BaseResult<T> newFailInstance(){
        BaseResult<T> result = new BaseResult<T>();
        result.setRetCode("-1");
        return result;
    }
    
}
